import cv2
import numpy as np

img = cv.imread("spider.png")
k = np.ones((5,5),np.uint8)
cv2.imshow("img",img)
dst =cv2.morphologyEx(img,cv2.MORPHOLOGY_TOPHAT,k)
cv2.imshow("dst",dst)
cv2.waitKey()
cv2.destroyAllWindows()
